<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件格式审核不通过通知</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }
        .container {
            max-width: 650px;
            margin: 0 auto;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 20px;
        }
        .header {
            background-color: #f44336;
            color: white;
            padding: 10px 20px;
            border-radius: 5px 5px 0 0;
            margin: -20px -20px 20px;
        }
        .content {
            padding: 0 20px;
        }
        .footer {
            margin-top: 30px;
            padding-top: 15px;
            border-top: 1px solid #ddd;
            font-size: 12px;
            color: #777;
            text-align: center;
        }
        h2 {
            color: #333;
        }
        .reason {
            background-color: #fff9c4;
            padding: 15px;
            border-radius: 5px;
            margin: 15px 0;
        }
        .suggestions {
            background-color: #e3f2fd;
            padding: 15px;
            border-radius: 5px;
            margin: 15px 0;
        }
        .requirements {
            background-color: #f5f5f5;
            padding: 15px;
            border-radius: 5px;
            margin: 15px 0;
        }
        .deadline {
            color: #f44336;
            font-weight: bold;
        }
        ul {
            padding-left: 20px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f5f5f5;
        }
        .severity-高 {
            color: #f44336;
            font-weight: bold;
        }
        .severity-中 {
            color: #ff9800;
        }
        .severity-低 {
            color: #2196f3;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>文件格式审核不通过通知</h1>
        </div>
        <div class="content">
            <p>尊敬的 <strong th:text="${studentName}">学生姓名</strong>：</p>
            
            <p>您好！您提交的任务 <strong th:text="${taskName}">任务名称</strong> 未通过系统AI格式审核。</p>
            
            <h2>未通过原因</h2>
            <div class="reason">
                <p th:text="${reason}">审核不通过原因</p>
            </div>
            
            <div th:if="${issues != null && !issues.empty}">
                <h2>详细问题</h2>
                <table>
                    <tr>
                        <th>文件名</th>
                        <th>问题描述</th>
                        <th>严重程度</th>
                    </tr>
                    <tr th:each="issue : ${issues}">
                        <td th:text="${issue.fileName}">文件名</td>
                        <td th:text="${issue.description}">问题描述</td>
                        <td th:class="${'severity-' + issue.severity}" th:text="${issue.severity}">严重程度</td>
                    </tr>
                </table>
            </div>
            
            <h2>修改建议</h2>
            <div class="suggestions">
                <ul>
                    <li th:each="suggestion : ${suggestions}" th:text="${suggestion}">修改建议</li>
                </ul>
            </div>
            
            <h2>文件要求</h2>
            <div class="requirements">
                <p th:utext="${fileRequirements != null ? fileRequirements : '无特殊要求'}">文件要求</p>
            </div>
            
            <h2>提交要求</h2>
            <div class="requirements">
                <p th:utext="${submitRequirements != null ? submitRequirements : '无特殊要求'}">提交要求</p>
            </div>
            
            <p>请根据以上要求和建议，修改您的提交内容，并尽快重新提交。</p>
            
            <p>如有任何疑问，请联系您的任课教师或管理员。</p>
            
            <p>祝学习愉快！</p>
            <p th:text="${systemName}">高校文件收集系统</p>
        </div>
        <div class="footer">
            <p>此邮件由系统自动发送，请勿直接回复。</p>
            <p>发送时间：<span th:text="${#dates.format(#dates.createNow(), 'yyyy-MM-dd HH:mm:ss')}">发送时间</span></p>
        </div>
    </div>
</body>
</html> 